jQuery.fn.extend({
	addMessage: function(messages){
		var msg = '';
		if($.isArray(messages)) {
			$.each(messages, function(index) {
				msg += '<div class="system ' + messages[index].type.toLowerCase() + '">' + messages[index].message + '</div>';
			});			
		} else {
			msg += '<div class="system ' + messages.type.toLowerCase() + '">' + messages.message + '</div>';
		}
		$('#message').html(msg);
	}, 
	cleanForm: function(){
		$(this).find('input:text, input:password, input:file, select, textarea').val('');
	    $(this).find('input:radio, input:checkbox').removeAttr('checked').removeAttr('selected');
	},
	redrawDataTable: function(){
		this.fnDraw();
	}		
});	